package br.com.DoceMagia.modelo.dao;

import java.sql.ResultSet;
import java.sql.Statement;
import java.text.DecimalFormat;
import java.util.List;

import br.com.DoceMagia.admUtil.DaoUtil;
import br.com.DoceMagia.modelo.entidade.ItensBuffet;

public class CadastroItemSistemaDAO {

	DaoUtil conexaoBanco = new DaoUtil();
	Statement statement = null;
	ResultSet resultSet = null;

	String query = null;
	
	public CadastroItemSistemaDAO(){
	}
	
	public void insertItem(String descricao, Double vlrServico, int tipo) {
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.append("INSERT INTO TIPO_ITEM_SISTEMA (descricao,vlrServico,tipoItemSistema) VALUES (");
		stringBuilder.append("'");
		stringBuilder.append(descricao);
		stringBuilder.append("',");
		stringBuilder.append("");
		stringBuilder.append(vlrServico);
		stringBuilder.append(",");
		stringBuilder.append("");
		stringBuilder.append(tipo);
		stringBuilder.append(")");
			query = stringBuilder.toString();
		try {
		DaoUtil.Conecta();
		statement = DaoUtil.getConnection().createStatement();
		statement.executeUpdate(query);


		DaoUtil.Fecha();
		} catch (Exception e1) {
			e1.printStackTrace();
		}
	}
	public void deleteItem(ItensBuffet item){
		
	}
	
}
